home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / linuxdoc-sgml-1.1 / html-fix / fixref.l < prev    next >
Encoding:
Lex Description  |  1995-05-03  |  329 b   |  31 lines

  1. %{
  2.  
  3. #include <stdio.h>
  4. #include <string.h>
  5.  
  6. #define DEBUG
  7.  
  8. char sectname[256];
  9.  
  10. int filenum = 0;
  11. int homefile = 1;
  12.  
  13. %}
  14.  
  15. %%
  16.  
  17. ^"<@@sect>".*$        { filenum++; homefile=0; }
  18. ^"<@@endsect>".*$    { homefile=1; }
  19.  
  20. ^"<@@label>".*$        {
  21.  
  22. strcpy( sectname, yytext+9 );
  23. printf( "<@@labelp>%s#%d\n", sectname, homefile?0:filenum );
  24.  
  25. }
  26.  
  27. .|\n            ;
  28.  
  29.  
  30.  
  31.